import { Controller, Get, Inject, Query } from '@nestjs/common';
import { UserService } from './user.service';
@Controller('user')
export class UserController {
  constructor(
    @Inject(UserService) private readonly UserService: UserService,
  ) { }

  @Get('find')
  async findOneUser(@Query() query) {
    const data = await this.UserService.findOneUser(query.id);
    return { code: 200, message: '查询成功', data };
  }

  @Get('list')
  async selectByQuery(@Query() query) {
    const data = await this.UserService.selectByQuery(query)
    return { code: 200, message: '查询成功', data }
  }
}
